:root {
    --primary-color: #1976d2;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --danger-color: #d32f2f;
    --success-color: #388e3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.knowledge-management {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.knowledge-management-sidebar {
    width: 240px;
    background-color: white;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
    /*padding: 20px 0;*/
    /*padding:20px 0 0 0;*/
    /*
    margin-bottom: 55px;
    */
    padding-top:30px;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    display: flex;
    align-items: center;
    font-size: 18px;
}

.sidebar-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background-color: var(--secondary-color);
}

.sidebar-menu a.active {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区样式 */
.knowledge-management .main-content {
    flex: 1;
    padding: 20px;
}

.knowledge-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.knowledge-management-header h1 {
    font-size: 24px;
    display: flex;
    align-items: center;
}

.knowledge-management-header h1 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

/* 知识库信息卡片 */
.knowledge-info {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.info-title {
    font-size: 18px;
    font-weight: 600;
}

.info-body {
    display: flex;
    gap: 30px;
}

.info-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-color: #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
}

.info-details {
    flex: 1;
}

.info-desc {
    color: var(--light-text);
    margin-bottom: 15px;
    line-height: 1.5;
}

.info-meta {
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item i {
    margin-right: 5px;
    color: var(--light-text);
}

/* 文件管理区域 */
.file-manager {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.file-title {
    font-size: 18px;
    font-weight: 600;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.file-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文件表格 */
.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: var(--secondary-color);
    font-weight: 500;
    color: var(--light-text);
}

.file-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.file-table tr:last-child td {
    border-bottom: none;
}

.file-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.02);
}

.file-icon {
    width: 40px;
    text-align: center;
    color: var(--light-text);
}

.file-name {
    display: flex;
    align-items: center;
}

.file-name i {
    margin-right: 10px;
    color: var(--primary-color);
}

.file-actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    align-items: center;
}

.page-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
}

.page-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    margin: 0 5px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .knowledge-management-sidebar {
        width: 100%;
        padding: 0;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-menu li {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .sidebar-menu a {
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    .info-body {
        flex-direction: column;
        gap: 15px;
    }

    .info-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .file-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .search-bar {
        width: 100%;
    }

    .file-filters {
        overflow-x: auto;
        padding-bottom: 5px;
    }
}